const state = {
  username: "zhangsan"
};

const getters = {
  username: (state) => state.username
};

const mutations = {
  setUsername: (state, username) => {
    state.username = username;
  }
};

const actions = {
  resetUsername({ commit }, username) {
    commit("setUsername", "");
  }
};

export default { state, getters, mutations, actions };
